import Relay from "react-relay";

export default class DelTemplateByIdMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { delTemplateById }`;
    }

    getVariables() {
        return {
            argsInput: {
                templateId:this.props.templateId,
                enterpriseId:this.props.enterpriseId,
                userId:this.props.userId,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on delTemplateByIdPayload {
            delTemplateById {
                errorCode
                value
                totalResult
                id
                orderTemplates{
                   name
                   tid
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on delTemplateByIdPayload {
                    delTemplateById {
                        errorCode
                        value
                        totalResult
                        id
                        orderTemplates{
                           name
                           tid
                        }
                    }
                }
            `]
        }];
    }

}
